package com.bonc.ioc.service;

import com.bonc.ioc.model.DataAssetInfo;
import com.bonc.ioc.model.SysDicInfo;
import com.bonc.ioc.vo.SysDicInfoVo;
import org.springframework.validation.BindException;

import java.util.List;

/**
 * @version 1.0
 * @description:
 * @author: wangqinglin
 * @date: 2021/3/18 14:47
 * @change : 2021/3/18 14:47 by q8541q@163.com  for init
 */
public interface SysDicInfoService {


    /**
     * 根据字典类型获取 所有选项
     *
     * @param value
     * @return
     */
    List<SysDicInfoVo> getByType(String value);

    /**
     * 查询分类字典
     * @param pid 父id
     * @return pid下的所有字典
     * @throws BindException
     */
    List<SysDicInfo> queryCategory(Integer pid) throws BindException;

    /**
     * 查询数据来源，分类
     * @return DataAssetInfo对象
     */
    List<DataAssetInfo> queryDataSource();

    List<SysDicInfoVo> getDirs();

    int save(SysDicInfoVo record);

    int deleteByPrimaryKey(String id);
}
